import 'package:flutter/material.dart';
import 'package:flutter_module/global/colors.dart';
import 'package:flutter_screenutil/screen_util.dart';
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        //appBar: AppBar(
        //  backgroundColor: Colors.black26,
        //  title: Text('container'),
        //),
        body: quequan(),
      ),
    );
  }
}

class quequan extends StatefulWidget {
  quequan({Key key}) : super(key: key);

  @override
  _quequanState createState() {
    return _quequanState();
  }
}

class _quequanState extends State<quequan> {
  @override
  void initState() {
    super.initState();
  }

  @override
  void dispose() {
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    ScreenUtil.init(
      BoxConstraints(
          maxWidth: MediaQuery.of(context).size.width,
          maxHeight: MediaQuery.of(context).size.height),
      designSize: Size(1080, 2340),
    );
    return Scaffold(
      backgroundColor: Color(0xff000B1F),
      appBar: AppBar(
        backgroundColor: Color(0xff000B1F),
        title: Text(
          '数字化艺术品确权书',
          style: TextStyle(
            color: Colors.white,
          ),
        ),
        centerTitle: true,
        leading: IconButton(
          icon: Icon(Icons.arrow_back, color: Colors.white),
          onPressed: () {
            Navigator.pop(context);
          },
        ),
        actions: [
          InkWell(
            onTap: () {
              Navigator.pushNamed(context, 'orderConfirm');
            },
            child: Center(
              child: Text(
                '确认',
                style: TextStyle(
                  fontSize: 17,
                  color: Colors.white,
                ),
              ),
            ),
          ),
          SizedBox(
            width: ScreenUtil().setWidth(40),
          ),
        ],
      ),
      body: Container(
        margin: EdgeInsets.fromLTRB(
          ScreenUtil().setWidth(0),
          ScreenUtil().setHeight(0),
          ScreenUtil().setWidth(0),
          ScreenUtil().setWidth(0),
        ),
        padding: EdgeInsets.fromLTRB(
          ScreenUtil().setWidth(30),
          ScreenUtil().setHeight(10),
          ScreenUtil().setWidth(30),
          ScreenUtil().setHeight(0),
        ),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Container(
              width: ScreenUtil().screenWidth,
              margin: EdgeInsets.fromLTRB(
                ScreenUtil().setWidth(0),
                ScreenUtil().setHeight(10),
                ScreenUtil().setWidth(0),
                ScreenUtil().setHeight(0),
              ),
              alignment: Alignment.bottomRight,
              child: Text(
                '签约日期: 2022-04-07',
                style: TextStyle(
                  fontSize: ScreenUtil().setSp(50),
                  color: Colors.white54,
                ),
              ),
            ),
            Container(
              width: ScreenUtil().screenWidth,
              margin: EdgeInsets.fromLTRB(
                ScreenUtil().setWidth(0),
                ScreenUtil().setHeight(10),
                ScreenUtil().setWidth(0),
                ScreenUtil().setHeight(0),
              ),
              alignment: Alignment.bottomRight,
              child: Text(
                '合同编号: ht8928334',
                style: TextStyle(
                  fontSize: ScreenUtil().setSp(50),
                  color: Colors.white54,
                ),
              ),
            ),
            Container(
              width: ScreenUtil().screenWidth,
              margin: EdgeInsets.fromLTRB(
                ScreenUtil().setWidth(30),
                ScreenUtil().setHeight(20),
                ScreenUtil().setWidth(30),
                ScreenUtil().setHeight(0),
              ),
              child: Text(
                "     经双方确认，供方向需方移交以下数字货品的货权，以执行合同编号为 43356 的《数字化艺术品确权书》。此货物的货权自本确认书签约之日起归需方所有。货物毁灭、灭失的风险也同时转移至需方（如上述合同对货权转移及风险转移另有约定，从其约定）。与原件相符的传真件同原件具有同样效力。",
                style: TextStyle(
                  fontSize: ScreenUtil().setSp(54),
                  color: Colors.white54,
                ),
              ),
            ),
            Container(
              width: ScreenUtil().screenWidth,
              margin: EdgeInsets.fromLTRB(
                ScreenUtil().setWidth(30),
                ScreenUtil().setHeight(20),
                ScreenUtil().setWidth(30),
                ScreenUtil().setHeight(0),
              ),
              child: Table(
                //所有列宽
                columnWidths: const {
                  //列宽
                  0: FixedColumnWidth(100.0),
                  1: FixedColumnWidth(200.0),
                  2: FixedColumnWidth(50.0),
                },
                //表格边框样式
                border: TableBorder.all(
                  color: Colors.white54,
                  width: 1.0,
                  style: BorderStyle.solid,
                ),
                children: [
                  TableRow(children: [
                    Text(
                      '商品名称:',
                      style: TextStyle(
                        fontSize: ScreenUtil().setSp(50),
                        color: Colors.white54,
                      ),
                    ),
                    Text(
                      '城市梦幻人',
                      style: TextStyle(
                        fontSize: ScreenUtil().setSp(50),
                        color: Colors.white54,
                      ),
                    ),
                  ]),
                  TableRow(children: [
                    Text(
                      '商品Hash码:',
                      style: TextStyle(
                        fontSize: ScreenUtil().setSp(50),
                        color: Colors.white54,
                      ),
                    ),
                    Text(
                      'QmPtdoRjb6jTVCmbNJzHU...',
                      style: TextStyle(
                        fontSize: ScreenUtil().setSp(50),
                        color: Colors.white54,
                      ),
                    ),
                  ]),
                  TableRow(children: [
                    Text(
                      '商品价值:',
                      style: TextStyle(
                        fontSize: ScreenUtil().setSp(50),
                        color: Colors.white54,
                      ),
                    ),
                    Text(
                      '2.1 ETH',
                      style: TextStyle(
                        fontSize: ScreenUtil().setSp(50),
                        color: Colors.white54,
                      ),
                    ),
                  ]),
                  TableRow(children: [
                    Text(
                      '账单索引:',
                      style: TextStyle(
                        fontSize: ScreenUtil().setSp(50),
                        color: Colors.white54,
                      ),
                    ),
                    Text(
                      'bill20220324909876543',
                      style: TextStyle(
                        fontSize: ScreenUtil().setSp(50),
                        color: Colors.white54,
                      ),
                    ),
                  ]),
                ],
              ),
              // child: Container(
              //     child: Column(
              //       children: [
              //         Row(
              //           children: [
              //             Text(
              //               '商品名称:',
              //               style:TextStyle(
              //                 fontSize: ScreenUtil().setSp(50),
              //                 color:Colors.white54,
              //               ),
              //             ),
              //           ],
              //         ),
              //         Row(
              //           children: [
              //             Text(
              //               '商品Hash码:',
              //               style:TextStyle(
              //                 fontSize: ScreenUtil().setSp(50),
              //                 color:Colors.white54,
              //               ),
              //             ),
              //           ],
              //         ),
              //         Row(
              //           children: [
              //             Text(
              //               '商品价值:',
              //               style:TextStyle(
              //                 fontSize: ScreenUtil().setSp(50),
              //                 color:Colors.white54,
              //               ),
              //             ),
              //           ],
              //         ),
              //         Row(
              //           children: [
              //             Text(
              //               '账单索引:',
              //               style:TextStyle(
              //                 fontSize: ScreenUtil().setSp(50),
              //                 color:Colors.white54,
              //               ),
              //             ),
              //           ],
              //         ),
              //       ],
              //     ),
              // ),
            ),
            Container(
              width: ScreenUtil().screenWidth,
              margin: EdgeInsets.fromLTRB(
                ScreenUtil().setWidth(30),
                ScreenUtil().setHeight(20),
                ScreenUtil().setWidth(30),
                ScreenUtil().setHeight(0),
              ),
              child: Text(
                "   供、需双方在该货权确认书上签名即视为供方已按约定完成交货义务，需方已接受此货物，且对该货物质量、价格无异议。",
                style: TextStyle(
                  fontSize: ScreenUtil().setSp(54),
                  color: Colors.white54,
                ),
              ),
            ),
            Container(
              width: ScreenUtil().screenWidth,
              margin: EdgeInsets.fromLTRB(
                ScreenUtil().setWidth(30),
                ScreenUtil().setHeight(20),
                ScreenUtil().setWidth(30),
                ScreenUtil().setHeight(0),
              ),
              child: Text(
                "双方签字: ",
                style: TextStyle(
                  fontSize: ScreenUtil().setSp(54),
                  color: Colors.white54,
                ),
              ),
            ),
            Container(
              width: ScreenUtil().screenWidth,
              margin: EdgeInsets.fromLTRB(
                ScreenUtil().setWidth(0),
                ScreenUtil().setHeight(10),
                ScreenUtil().setWidth(0),
                ScreenUtil().setHeight(0),
              ),
              alignment: Alignment.bottomRight,
              child: Text(
                '供    方: Elbeau    ',
                style: TextStyle(
                  fontSize: ScreenUtil().setSp(50),
                  color: Colors.white54,
                ),
              ),
            ),
            Container(
              width: ScreenUtil().screenWidth,
              margin: EdgeInsets.fromLTRB(
                ScreenUtil().setWidth(0),
                ScreenUtil().setHeight(10),
                ScreenUtil().setWidth(0),
                ScreenUtil().setHeight(0),
              ),
              alignment: Alignment.bottomRight,
              child: Text(
                '需求方: siegelion',
                style: TextStyle(
                  fontSize: ScreenUtil().setSp(50),
                  color: Colors.white54,
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
